import {
  createRouter,
  createWebHistory,
  createWebHashHistory,
} from "vue-router";

import MenuVue from "@/view/Menu.vue";
import AddWorkVue from "@/view/common/work/AddWork.vue";
import SelectWorkListVue from "@/view/common/work/SelectWorkList.vue";
import CourseVue from "@/view/common/course/Course.vue";
import CourseMangementVue from "@/view/common/course/CourseMangement.vue";
import CourseListVue from "@/view/common/course/CourseList.vue";
import CourseDetailVue from "@/view/common/course/CourseDetail.vue";
import AddSchoolVue from "@/view/system/school/AddSchool.vue";
import StudentProgressVue from "@/view/teacher/student/StudentProgress.vue";
import SelectWorkVue from "@/view/common/work/SelectWork01.vue";
import UserInfoVue from "@/view/common/user/UserInfo.vue";
import UserSafe from "@/view/common/user/UserSafe.vue";
import LoginVue from "@/view/Login.vue";
import ClassAuthorizationVue from "@/view/common/course/ClassAuthorization.vue";
import AddSystemVue from "@/view/system/AddSystem.vue";
import CourseArticleVue from "@/view/common/course/CourseArticle.vue";
import HomeVue from "@/view/Home.vue";
import AddClassVue from "@/view/teacher/class/AddClass.vue";
import AddStudentVue from "@/view/common/course/Addstudent.vue";
import NowAddWorkVue from "@/view/common/work/NowAddWork.vue";
import CorrectingWork from "@/view/teacher/class/CorrectingWork.vue";
import Radio from "@/view/common/course/ObjectiveQuestions/Radio.vue";
import MultipleChoices from "@/view/common/course/ObjectiveQuestions/MultipleChoices.vue";
import Judgment from "@/view/common/course/ObjectiveQuestions/Judgment.vue";
import QuestionBankManagement from "@/view/common/course/QuestionBankManagement.vue";
import maintenance from "@/view/common/course/labelmaintenance/maintenance.vue";
import homework from "@/view/teacher/class/homework.vue";
import Guanli from "@/view/common/course/labelmaintenance/guanli.vue";
import addfuze from "@/view/system/addfuze.vue";
import teachermessage from "@/view/system/teachermeaasge.vue";
import testPaper from "@/view/common/work/BuildExamination.vue";
import Paper from "@/view/common/work/Paper.vue";
import Examti from "@/view/teacher/exam/examti.vue";
import Examtindex from "@/view/teacher/exam/index.vue";
import Kaoguanli from "@/view/teacher/exam/kaoguanli.vue";
import index2 from "@/view/teacher/exam/index2.vue";
import analog from "@/view/teacher/exam/analog.vue";
import trtm  from "@/view/common/course/labelmaintenance/teacheingresearchTeachermessage.vue"

const routes = [
  { path: "/login", component: LoginVue },
  {
    path: "/",
    component: HomeVue,
  },
  { path: "/exam/examti", component: Examti },
  {
    path: "/menu",
    component: MenuVue,
    //重定向
    redirect: "/course/CourseList",
    //子路由
    children: [
      { path: "/exam/analog", component: analog, name: "analog" },
      { path: "/exam/index2", component: index2 },
      { path: "/exam/Kaoguanli", component: Kaoguanli },
      { path: "/exam/index", component: Examtindex },
      { path: "/work/NowAddWork", component: NowAddWorkVue },
      // { path: "/work/SelectWorkList", component: SelectWorkListVue },
      { path: "/class/homework", component: homework },
      { path: "/class/CorrectingWork", component: CorrectingWork },
      { path: "/course/Course", component: CourseVue },
      { path: "/home", component: HomeVue },

      { path: "/course/CourseMangement", component: CourseMangementVue },
      { path: "/course/CourseList", component: CourseListVue },
      { path: "/course/CourseDetail", component: CourseDetailVue },
      { path: "/school/AddSchool", component: AddSchoolVue },
      { path: "/student/StudentProgress", component: StudentProgressVue },
      { path: "/work/SelectWork01", component: SelectWorkVue },
      { path: "/user/UserInfo", component: UserInfoVue },
      { path: "/user/UserSafe", component: UserSafe },
      {
        path: "/authorization/ClassAuthorization",
        component: ClassAuthorizationVue,
      },
      { path: "/system/AddSystem", component: AddSystemVue },
      { path: "/class/AddClass", component: AddClassVue },
      { path: "/course/AddStudent", component: AddStudentVue },

      {
        path: "/course/QuestionBankManagement",
        component: QuestionBankManagement,
        children: [
          { path: "/course/ObjectiveQuestions/Radio", component: Radio },
          {
            path: "/course/ObjectiveQuestions/MultipleChoices",
            component: MultipleChoices,
          },
          { path: "/course/ObjectiveQuestions/Judgment", component: Judgment },
        ],
      },
      { path: "/maintenance", component: maintenance },
      { path: "/course/labelmaintenance/guanli", component: Guanli },
      { path: "/course/labelmaintenance/teacheingresearchTeachermessage", component: trtm },
      { path: "/system/addfuze", component: addfuze },
      { path: "/system/teachermessage", component: teachermessage },
      { path: "/testpaper", component: testPaper },
      { path: "/paper", component: Paper },
    ],
  },
  { path: "/course/CourseArticle", component: CourseArticleVue },
];

//创建路由器
const router = createRouter({
  history: createWebHashHistory(),
  routes: routes,
});

export default router;
